package com.nado.extensions.util;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * @author nhn
 *
 */
public abstract class BaseModel implements Cloneable{
	/**
	 * @param obj - Object
	 * @return boolean
	 * @see java.lang.Object#equals(java.lang.Object)
	 **/
	@Override
	public boolean equals(Object obj) {
		return EqualsBuilder.reflectionEquals(this, obj);
	}
	
	/**
	 * @return int
	 * @see java.lang.Object#hashCode()
	 **/
	@Override
	public int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}
	
	/**
	 * @return String
	 * @see java.lang.Object#toString()
	 **/
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	
}
